import { type RouteRecordRaw } from 'vue-router';

export const pushRoutes: RouteRecordRaw[] = [
  {
    path: '/push',
    name: 'push',
    meta: { title: '推送管理', icon: 'guide' },
    children: [
      {
        path: 'upgradeManagement',
        name: 'upgradeManagement',
        meta: { title: '升级管理', icon: 'menu-clipboard' },
        redirect: '/push/softwareVersion',
        children: [
          {
            path: 'softwareVersion',
            name: 'softwareVersion',
            meta: { title: '软件版本管理', icon: 'menu-control' },
            component: () =>
              import('@/views/push/upgradeManagement/software/Index.vue'),
          },
          {
            path: 'firmwareVersion',
            name: 'firmwareVersion',
            meta: { title: '固件版本管理', icon: 'menu-form' },
            component: () =>
              import('@/views/push/upgradeManagement/firmware/Index.vue'),
          },
          {
            path: 'upgradeTasks',
            name: 'upgradeTasks',
            meta: { title: '升级任务管理', icon: 'menu-control' },
            component: () =>
              import('@/views/push/upgradeManagement/tasks/Index.vue'),
          },
          {
            path: 'upgradeApp',
            name: 'upgradeApp',
            meta: { title: 'APP升级管理', icon: 'menu-app' },
            component: () =>
              import('@/views/push/upgradeManagement/upgradeApp/Index.vue'),
          },
          {
            path: 'upgradePackage',
            name: 'upgradePackage',
            meta: { title: '升级包配置', icon: 'menu-tree-table' },
            component: () =>
              import('@/views/push/upgradeManagement/upgradePackage/Index.vue'),
          },
        ],
      },

      {
        path: 'quickConfigManagement',
        name: 'quickConfigManagement',
        meta: { title: '快速配置管理', icon: 'menu-cascader' },
        redirect: '/push/quickConfig',
        children: [
          {
            path: 'quickConfig',
            name: 'quickConfig',
            meta: { title: '快速配置模版', icon: 'menu-cascader' },
            component: () => import('@/views/push/quickConfig/Index.vue'),
          },
          {
            path: 'configProjectPush',
            name: 'configProjectPush',
            meta: { title: '项目推送任务', icon: 'menu-cascader' },
            props: { pushType: '1' },
            component: () => import('@/views/push/configPush/Index.vue'),
          },
          {
            path: 'configDevicePush',
            name: 'configDevicePush',
            meta: { title: '设备推送任务', icon: 'menu-cascader' },
            props: { pushType: '2' },
            component: () => import('@/views/push/configPush/Index.vue'),
          },
        ],
      },

      {
        path: 'bulkRegistration',
        name: 'bulkRegistration',
        meta: { title: '批量注册', icon: 'menu-date' },
        component: () => import('@/views/push/bulkRegistration/Index.vue'),
      },
      {
        path: 'exerciseManagement',
        name: 'exerciseManagement',
        meta: { title: '演练管理', icon: 'menu-post' },
        redirect: '/push/exerciseManagement/warningDrill',
        children: [
          {
            path: 'warningDrill',
            name: 'warningDrill',
            meta: { title: '预警演练', icon: 'menu-example' },
            // props: { warningSource: '2' },
            component: () =>
              import('@/views/push/exerciseManagement/warningDrill/Index.vue'),
          },
          // {
          //   path: 'rapidAlert',
          //   name: 'rapidAlert',
          //   meta: { title: '快速预警' },
          //   props: { warningSource: '1' },
          //   component: () =>
          //     import('@/views/push/exerciseManagement/warningDrill/Index.vue'),
          // },
          {
            path: 'eewRehearsal',
            name: 'eewRehearsal',
            meta: { title: '速报演练', icon: 'menu-post' },
            component: () =>
              import('@/views/push/exerciseManagement/eewRehearsal/Index.vue'),
          },
          {
            path: 'weatherDrill',
            name: 'weatherDrill',
            meta: { title: '气象演练', icon: 'menu-weather' },
            component: () =>
              import('@/views/push/exerciseManagement/weatherDrill/Index.vue'),
          },
          {
            path: 'alertLevel',
            name: 'alertLevel',
            meta: { title: '预警等级配置', icon: 'menu-dict' },
            component: () =>
              import('@/views/push/exerciseManagement/alertLevel/Index.vue'),
          },
        ],
      },
      {
        path: 'dataManagement',
        name: 'dataManagement',
        meta: { title: '资料管理', icon: 'menu-education' },
        redirect: '/push/dataManagement/picture',
        children: [
          {
            path: 'picture',
            name: 'picture',
            meta: { title: '图片管理', icon: 'menu-destop' },
            component: () =>
              import('@/views/push/dataManagement/picture/Index.vue'),
          },
          {
            path: 'video',
            name: 'video',
            meta: { title: '视频管理', icon: 'menu-tool' },
            component: () =>
              import('@/views/push/dataManagement/video/Index.vue'),
          },
          {
            path: 'audio',
            name: 'audio',
            meta: { title: '音频管理', icon: 'menu-color' },
            component: () =>
              import('@/views/push/dataManagement/audio/Index.vue'),
          },
          {
            path: 'notice',
            name: 'notice',
            meta: { title: '通知管理', icon: 'menu-code' },
            component: () =>
              import('@/views/push/dataManagement/notice/Index.vue'),
          },
          {
            path: 'broad',
            name: 'broad',
            meta: { title: '广播管理', icon: 'menu-code' },
            component: () =>
              import('@/views/push/dataManagement/broad/Index.vue'),
          },
        ],
      },
      {
        path: 'messagePush',
        name: 'messagePush',
        meta: { title: '消息推送配置', icon: 'menu-wechat' },
        component: () => import('@/views/push/messagePush/Index.vue'),
      },
    ],
  },
];
